<%--
  Created by IntelliJ IDEA.
  User: student
  Date: 2020/9/12
  Time: 16:11
  To change this template use File | Settings | File Templates.
--%>
<%@page language="java" pageEncoding="UTF-8" contentType="text/html; UTF-8" isELIgnored="false" %>
<%@ include file="../common.jsp" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>layout 后台大布局 - Layui</title>
    <link rel="stylesheet" href="${ctx}/statics/layui/css/layui.css">
    <style>
        #box iframe{
            width: 100%;
            height: 100%;
            border: 0;
            padding: 0px 0px 0px 10px;
        }
        #box{
            background-color: #eeffee;
        }
        #box table{
            background-color: #00FFFF;
        }
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">图书管理系统</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="${ctx}/user/toAdd">图书上架</a></li>
            <li class="layui-nav-item"><a href="${ctx}/user/toUpload">图书管理</a></li>
            <li class="layui-nav-item"><a href="">图书下架</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">其它系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="">邮件管理</a></dd>
                    <dd><a href="">消息管理</a></dd>
                    <dd><a href="">授权管理</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <i class="layui-icon-user"></i>
                    贤心
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="${ctx}/user/loginout">退了</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">所有商品</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">列表一</a></dd>
                        <dd><a href="javascript:;">列表二</a></dd>
                        <dd><a href="javascript:;">列表三</a></dd>
                        <dd><a href="">超链接</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">解决方案</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">列表一</a></dd>
                        <dd><a href="javascript:;">列表二</a></dd>
                        <dd><a href="">超链接</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;" id="box" >

            <table id="demo" lay-filter="test" width="1800" lay-data="{id: 'idTest'}"></table>

            <script src="${ctx}/statics/layui/layui.all.js"></script>
            <script>
                layui.use('table', function(){
                    var table = layui.table;

                    //第一个实例
                    table.render({
                        elem: '#demo'
                        ,height: 700
                        ,width:1800
                        ,toolbar: '#toolbarDemo'
                        ,url: '${ctx}/user/list' //数据接口
                        ,cellMinWidth:80
                        ,cols: [[ //表头

                            {field: 'id', title: 'ID', width:240, sort: true, fixed: 'left'}
                            ,{field: 'category', title: '图书类别', width:240}
                            ,{field: 'title', title: '图书名称', width:240, sort: true}
                            ,{field: 'summary', title: '简介', width:240}
                            ,{field: 'uploaduser', title: '上传人', width: 240}
                            ,{field: 'createdate', title: '上传时间', width: 240, sort: true}
                           ,{field:'left',title:'操作',toolbar:'#barDemo',width:240}
                        ]]
                        ,page:true
                    });

                });
            </script>
            <script type="text/html" id="barDemo">
              <a class="layui-btn layui-btn-xs" lay-even="edit">编辑</a>
              <a href="" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
            </script>

        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © layui.com - 底部固定区域
    </div>
</div>
<script src="${ctx}/statics/layui/layui.all.js"></script>
<script type="text/javascript">



</script>
</body>
</html>